import axiosInstance from '@/utils/axiosInstance';

const userApi = {
  list: (current, pageSize) => {
    return axiosInstance.get(`/ui/user/list?current=${current}&pageSize=${pageSize}`);
  },
  add: data => {
    return axiosInstance.post('ui/user/add', data);
  },
  getDataById: id => {
    return axiosInstance.get(`ui/user/find?id=${id}`);
  },
  update: data => {
    return axiosInstance.post('ui/user/update', data);
  },
  delete: id => {
    return axiosInstance.patch('ui/user/delete', id);
  }
};

export default userApi;
